﻿/**
 *
 * @file BrowserTableHandlerNCTAbstract.h
 * @brief 声学包表格处理器抽象类声明
 * @author wangning (2185896382@qq.com)
 * @date 2024-12-16
 *
 */
#ifndef _BEOWSERTABLE_HANDLER_NTC_Abstract_H___
#define _BEOWSERTABLE_HANDLER_NTC_Abstract_H___

#include "WidgetBrowserTable.h"

namespace EventOper
{
    class OperAbstractNCT;
}

namespace Acoustics
{
    class FITKAcousticsAbsNCT;
}

namespace GUI
{
    /**
     * @brief 多层声学包表格处理器抽象类
     * @author wangning (2185896382@qq.com)
     * @date 2024-12-16
     */
    class GUIWIDGETAPI BrowserTableHandlerNCTAbstract : public BrowserTableAbstractHandler
    {
        Q_OBJECT
    public:
        /**
         * @brief 构造函数
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        using BrowserTableAbstractHandler::BrowserTableAbstractHandler;
        /**
         * @brief 析构函数
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual ~BrowserTableHandlerNCTAbstract() = 0;
        /**
         * @brief 右键菜单
         * @param[i]  popMenu        右键菜单
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void contextMenu(QMenu* popMenu) override;
        /**
         * @brief 表头右键菜单
         * @param[i]  popMenu        右键菜单
         * @param[i]  coluIndex      列索引
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void headerContextMenu(QMenu* popMenu, int coluIndex) override;

    protected:
        /**
         * @brief 获取操作器
         * @return EventOper::OperAbstractPhysics*
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual EventOper::OperAbstractNCT* getNCTOper() = 0;
        /**
         * @brief 是否允许批量修改
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-09
         */
        virtual bool enableAttriSet();
        /**
         * @brief 单元格双击
         * @param[i]  row         行索引
         * @param[i]  colum         列索引
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-12-05
         */
        virtual void itemDoubleClicked(int row, int colum) override;
        /**
        * @brief 编辑材料颜色
        * @param[i] button 点击的按钮
        * @param[i] data  数据对象
        * @author LiBaojun (libaojunqd@foxmail.com)
        * @date 2024-12-19
        */
        void onEditItemColor(QPushButton* button, Acoustics::FITKAcousticsAbsNCT* data);

    private slots:
        /**
         * @brief 编辑声学包
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        void editNCTSlot();
        /**
         * @brief 新增声学包
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        void createNCTSlot();
        /**
         * @brief 复制声学包
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        void duplicateNCTSlot();
        /**
         * @brief 移除声学包
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        void removeNCTSlot();
        /**
         * @brief  批量设置属性
         * @author wangning (2185896382@qq.com)
         * @date 2024-12-10
         */
        void setAttributeSlot();
    };
}


#endif